<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <{include file='backend/lib/meta.html'}>
  <link rel="stylesheet" type="text/css" href="public/theme/backend/css/verydows.css" />
  <link rel="stylesheet" type="text/css" href="public/theme/backend/css/main.css" />
  <script type="text/javascript" src="public/script/jquery.js"></script>
  <script type="text/javascript" src="public/theme/backend/js/verydows.js"></script>
  <script type="text/javascript" src="public/theme/backend/js/list.js"></script>
  <script type="text/javascript">
    $(function(){searchRes(1);});

    function searchRes(page_id){
      var dataset = {username: $('#username').val(), page:page_id};

      $.asynList("<{url m=$MOD c='user_cash_log' a='index' step='search'}>", dataset, function(data){
        if(data.status == 'success'){
          juicer.register('format_date', function(v){return formatTimestamp(v, 'y-m-d<br />h:i:s');});
          $('#rows').append(juicer($('#row-tpl').html(), data));
          $('#rows tr').vdsRowHover();
          $('#rows tr:even').addClass('even');
          if(data.paging != null) $('#rows').append(juicer($('#paging-tpl').html(), data));
        }else{
          $('#rows').append("<div class='nors mt5'>未找到相关数据记录...</div>");
        }
      });
    }

    function pageturn(page_id){searchRes(page_id);}
  </script>
</head>
<body>
<div class="content">
  <div class="loc"><h2><i class="icon"></i>用户账户日志</h2></div>
  <div class="box">
    <div class="doacts"> <a class="ae btn" onclick="domulent('<{url m=$MOD c='user_cash_log' a='delete'}>')"><i class="remove"></i><font>删除</font></a> </div>
    <div class="stools mt5">
      <input type="text" class="w300 txt" id="username" placeholder="输入用户名" />
      <button type="button" class="sbtn btn" onclick="searchRes(1)">搜 索</button>
    </div>
    <div class="module mt5" id="rows"></div>
    <{include file='backend/lib/paging.html'}>
  </div>
</div>
<script type="text/template" id="row-tpl">
  <form method="post" id="mulentform">
    <table class="datalist">
      <tr>
        <th width="120">用户</th>
        <th width="120">提现金额</th>
        <th class="ta-l">提现状态</th>
        <th width="110">日期</th>
      </tr>
      {@each list as v}
      <tr>
        <td><font class="">${v.user}</font></td>
        <td><font class="">-${v.money}</font></td>
        <td>{@if v.status == 0}<font class="c999">失败</font> {@else if v.status == 1}<font class="green">成功</font> {@/if}</td>
        <td class="c888">$${v.dateline|format_date}</td>
      </tr>
      {@/each}
    </table>
  </form>
</script>
<script type="text/javascript" src="public/script/juicer.js"></script>
</body>
</html>